home *** CD-ROM | disk | FTP | other *** search
/ PC Format (UK) 134 / PC Format DVD 2002.iso / Full / 3D Flash Animator / 3DFlashAnimator3Setup.exe / file0775_1ed289_1ed679.bin < prev    next >
Encoding:
Text File  |  2001-11-08  |  3.1 KB  |  112 lines

  1. <comment> Creates a new flash movie. </comment>
  2.  
  3. <title>New Animated Icon</title>
  4.  
  5. <script language="EasyScript">
  6.  
  7. registry = "New\\Icon";
  8.  
  9. /////////////////
  10. function OnLoad ()
  11. {
  12.     movie = new Movie;
  13.     movie.setDefaultName ();
  14.  
  15.     radio_size = getRegistryValue (registry, "radio_size", 2);
  16.     color_depth = getRegistryValue (registry, "color_depth", 3);
  17.     user_width = getRegistryValue (registry, "user_width", 100);
  18.     user_height = getRegistryValue (registry, "user_height", 100);
  19. }
  20. /////////////////////
  21. function CreateIcon ()
  22. {
  23.     setRegistryValue (registry, "radio_size", radio_size);
  24.     setRegistryValue (registry, "color_depth", color_depth);
  25.     setRegistryValue (registry, "user_width", user_width);
  26.     setRegistryValue (registry, "user_height", user_height);
  27.  
  28.     width = 320;
  29.     height = 240;
  30.     switch (radio_size){
  31.         case 1:
  32.             width = 20;
  33.             height = 20;
  34.             break;
  35.         case 2:
  36.             width = 32;
  37.             height = 32;
  38.             break;
  39.         case 3:
  40.             width = 48;
  41.             height = 48;
  42.             break;
  43.         case 4:
  44.             width = 64;
  45.             height = 64;
  46.             break;
  47.         case 5:
  48.             width = user_width;
  49.             height = user_height;
  50.             break;}
  51.  
  52.     movie.width = width;
  53.     movie.height = height;
  54.     movie.depth = color_depth;
  55.     movie.export_width = width;
  56.     movie.export_height = height;
  57.  
  58.     movie.zoom_mode = "in";
  59.     movie.zoom_factor = floor (64 / width) * 4 + 2;
  60.  
  61.     new_frame = movie.frames.addNewFrame();
  62.     new_frame.name = "Key frame " + (movie.frames.count());
  63.  
  64.     if (movie.create ()){
  65.         movie.resetCenter ();
  66.         movie.saved();
  67.  
  68.         window.returnValue (movie);
  69.         window.close ();}
  70. }
  71.  
  72. </script>
  73.  
  74. <body bgcolor="normal" text="#000000" OnLoad="OnLoad()" OnEnter="CreateIcon()" translate>
  75. <div valign=middle>
  76.  
  77. <table width="100%" cellspacing=4 cellpadding=0 bgcolor="light" borderstyle="raised">
  78. <tr><td valign=top><img src="images/large_flash.bitmap"><spacer>
  79. <td><table>
  80. <tr><td>
  81. <font size=5>Animated Icon</font>
  82. <td><input type="text" size=16 name="movie.name"><spacer>
  83. </table></table>
  84.  
  85. <spacer height=4>
  86.  
  87. <table width=100% cellspacing=4 cellpadding=0 bgcolor="light" borderstyle="raised">
  88. <tr><td>
  89. <table cellspacing=4 cellpadding=4 width=100%>
  90. <td width=exact valign=top>
  91.     <table cellspacing=0 cellpadding=2>
  92.     <tr><td><input type="radio" name="radio_size" value="1"><a onclick="radio_size=1">20 x 20</a>
  93.     <tr><td><input type="radio" name="radio_size" value="2"><a onclick="radio_size=2">32 x 32</a>
  94.     <tr><td><input type="radio" name="radio_size" value="3"><a onclick="radio_size=3">48 x 48</a>
  95.     <tr><td><input type="radio" name="radio_size" value="4"><a onclick="radio_size=4">64 x 64</a>
  96.     <tr><td><input type="radio" name="radio_size" value="5"><a onclick="radio_size=5">Other</a>
  97.         <input type="text" name="user_width" size=4>x
  98.         <input type="text" name="user_height" size=4>
  99.     </table>
  100. </table>
  101. </table>
  102.  
  103. <spacer height=8>
  104.  
  105. <table cellspacing=0 cellpadding=0 width="100%">
  106. <tr><td align=right>
  107. <a button onMouseUp="CreateIcon()" width=+10 height=+2><img src="images/small_flash.bitmap" hspace=4>Create animated icon</a>
  108. <a button onMouseUp="window.close()" width=+20 height=+2><img src="images/small_cancel.bitmap" hspace=4>Cancel</a>
  109. </table>
  110.  
  111. <spacer height=4>
  112.